Copy Code code as follows:
' Hardware_info.vbs v1.1 By:fastslz
On Error Resume Next
Dim Wmi,ws,fso
Set WMI = GetObject ("winmgmts:{impersonationlevel=impersonate}!\\.\root\cimv2")
Set Coss = WMI. ExecQuery ("SELECT * from
How to use JavaScript to obtain client computer hardware and system information
WMI is used to obtain the hardware and system information of the client computer:
Function getSysInfo () {var locator = new ActiveXObject ("WbemScripting. SWbemLocator "
WinXP, Win7, Win8
Copy codeThe Code is as follows: 'indicate the source for reprinting original content and referencing the core part of the code.
Hard disk read/write statistics. vbs
If (Lcase (Right (Wscript. FullName, 11) = "wscript.exe")
JavaScript access to client computer hardware and system InformationAccess to client computer hardware and system information through WMI:
Copy Code code as follows:
function Getsysinfo () {
var locator = new ActiveXObject
JavaScript gets client computer hardware and system InformationTo obtain client computer hardware and system information through WMI://System Information AcquisitionfunctionGetsysinfo () {varLocator =NewActiveXObject ("WbemScripting.SWbemLocator");
Winxp,win7,win8
Copy Code code as follows:
' Original content reprint, the reference code core part please indicate the source
Hard disk read and write statistics. vbs
If (Lcase right (wscript.fullname,11) = "Wscript.exe") Then
Logic is simpler, directly on the code
Timed delivery uses the win server's timed task to execute the script regularly
#coding: Utf-8 __future__ Import Division import PYMSSQL,SYS,DATETIME,XLWT Import smtplib from Email.mime.text Impor T mimetext
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.